{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "import openpyxl as op\n",
    "import os\n",
    "import re\n",
    "import time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "wb = op.Workbook()\n",
    "ws = wb.active\n",
    "ws.title = \"summary\"\n",
    "wb.save(\"summary.xlsx\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>step</th>\n",
       "      <th>type</th>\n",
       "      <th>amount</th>\n",
       "      <th>nameOrig</th>\n",
       "      <th>oldbalanceOrg</th>\n",
       "      <th>newbalanceOrig</th>\n",
       "      <th>nameDest</th>\n",
       "      <th>oldbalanceDest</th>\n",
       "      <th>newbalanceDest</th>\n",
       "      <th>isFraud</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>8</td>\n",
       "      <td>CASH_OUT</td>\n",
       "      <td>158007.12</td>\n",
       "      <td>C424875646</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>C1298177219</td>\n",
       "      <td>474016.32</td>\n",
       "      <td>1618631.97</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>236</td>\n",
       "      <td>CASH_OUT</td>\n",
       "      <td>457948.30</td>\n",
       "      <td>C1342616552</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>C1323169990</td>\n",
       "      <td>2720411.37</td>\n",
       "      <td>3178359.67</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>37</td>\n",
       "      <td>CASH_IN</td>\n",
       "      <td>153602.99</td>\n",
       "      <td>C900876541</td>\n",
       "      <td>11160428.67</td>\n",
       "      <td>11314031.67</td>\n",
       "      <td>C608741097</td>\n",
       "      <td>3274930.56</td>\n",
       "      <td>3121327.56</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>331</td>\n",
       "      <td>CASH_OUT</td>\n",
       "      <td>49555.14</td>\n",
       "      <td>C177696810</td>\n",
       "      <td>10865.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>C462716348</td>\n",
       "      <td>0.00</td>\n",
       "      <td>49555.14</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>250</td>\n",
       "      <td>CASH_OUT</td>\n",
       "      <td>29648.02</td>\n",
       "      <td>C788941490</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>C1971700992</td>\n",
       "      <td>56933.09</td>\n",
       "      <td>86581.10</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199994</th>\n",
       "      <td>201</td>\n",
       "      <td>PAYMENT</td>\n",
       "      <td>1274.97</td>\n",
       "      <td>C361372882</td>\n",
       "      <td>69376.00</td>\n",
       "      <td>68101.03</td>\n",
       "      <td>M671547467</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199995</th>\n",
       "      <td>212</td>\n",
       "      <td>CASH_OUT</td>\n",
       "      <td>204041.98</td>\n",
       "      <td>C1621547576</td>\n",
       "      <td>40423.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>C1571552280</td>\n",
       "      <td>0.00</td>\n",
       "      <td>204041.98</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199996</th>\n",
       "      <td>160</td>\n",
       "      <td>CASH_IN</td>\n",
       "      <td>66378.61</td>\n",
       "      <td>C1431532774</td>\n",
       "      <td>2852895.88</td>\n",
       "      <td>2919274.49</td>\n",
       "      <td>C1831159716</td>\n",
       "      <td>264223.39</td>\n",
       "      <td>197844.78</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199997</th>\n",
       "      <td>12</td>\n",
       "      <td>CASH_IN</td>\n",
       "      <td>87473.93</td>\n",
       "      <td>C695681900</td>\n",
       "      <td>1674588.27</td>\n",
       "      <td>1762062.20</td>\n",
       "      <td>C371793088</td>\n",
       "      <td>245563.25</td>\n",
       "      <td>158089.32</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199998</th>\n",
       "      <td>15</td>\n",
       "      <td>CASH_OUT</td>\n",
       "      <td>97305.08</td>\n",
       "      <td>C809605956</td>\n",
       "      <td>21328.00</td>\n",
       "      <td>0.00</td>\n",
       "      <td>C194464706</td>\n",
       "      <td>0.00</td>\n",
       "      <td>97305.08</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>199999 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        step      type     amount     nameOrig  oldbalanceOrg  newbalanceOrig  \\\n",
       "0          8  CASH_OUT  158007.12   C424875646           0.00            0.00   \n",
       "1        236  CASH_OUT  457948.30  C1342616552           0.00            0.00   \n",
       "2         37   CASH_IN  153602.99   C900876541    11160428.67     11314031.67   \n",
       "3        331  CASH_OUT   49555.14   C177696810       10865.00            0.00   \n",
       "4        250  CASH_OUT   29648.02   C788941490           0.00            0.00   \n",
       "...      ...       ...        ...          ...            ...             ...   \n",
       "199994   201   PAYMENT    1274.97   C361372882       69376.00        68101.03   \n",
       "199995   212  CASH_OUT  204041.98  C1621547576       40423.00            0.00   \n",
       "199996   160   CASH_IN   66378.61  C1431532774     2852895.88      2919274.49   \n",
       "199997    12   CASH_IN   87473.93   C695681900     1674588.27      1762062.20   \n",
       "199998    15  CASH_OUT   97305.08   C809605956       21328.00            0.00   \n",
       "\n",
       "           nameDest  oldbalanceDest  newbalanceDest  isFraud  \n",
       "0       C1298177219       474016.32      1618631.97        0  \n",
       "1       C1323169990      2720411.37      3178359.67        0  \n",
       "2        C608741097      3274930.56      3121327.56        0  \n",
       "3        C462716348            0.00        49555.14        0  \n",
       "4       C1971700992        56933.09        86581.10        0  \n",
       "...             ...             ...             ...      ...  \n",
       "199994   M671547467            0.00            0.00        0  \n",
       "199995  C1571552280            0.00       204041.98        0  \n",
       "199996  C1831159716       264223.39       197844.78        0  \n",
       "199997   C371793088       245563.25       158089.32        0  \n",
       "199998   C194464706            0.00        97305.08        0  \n",
       "\n",
       "[199999 rows x 10 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.read_csv(\"transactions.csv\")\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>branch_l1</th>\n",
       "      <th>period</th>\n",
       "      <th>stat_month</th>\n",
       "      <th>amt</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>8659</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津市</td>\n",
       "      <td>去年同期</td>\n",
       "      <td>01月</td>\n",
       "      <td>8394</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>8239</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>天津市</td>\n",
       "      <td>去年同期</td>\n",
       "      <td>02月</td>\n",
       "      <td>8371</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>9327</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>115</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>去年同期</td>\n",
       "      <td>10月</td>\n",
       "      <td>8622</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>116</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>9465</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>去年同期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8324</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>118</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9496</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>119</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>去年同期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9688</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>120 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    branch_l1 period stat_month   amt\n",
       "0         天津市     本期        01月  8659\n",
       "1         天津市   去年同期        01月  8394\n",
       "2         天津市     本期        02月  8239\n",
       "3         天津市   去年同期        02月  8371\n",
       "4         天津市     本期        03月  9327\n",
       "..        ...    ...        ...   ...\n",
       "115   澳门特别行政区   去年同期        10月  8622\n",
       "116   澳门特别行政区     本期        11月  9465\n",
       "117   澳门特别行政区   去年同期        11月  8324\n",
       "118   澳门特别行政区     本期        12月  9496\n",
       "119   澳门特别行政区   去年同期        12月  9688\n",
       "\n",
       "[120 rows x 4 columns]"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 生成模拟数据\n",
    "\n",
    "import faker\n",
    "fake = faker.Faker('zh_CN')\n",
    "\n",
    "stat_month_list = [('0'+ str(x+1))[-2:] + '月' for x in range(12)]\n",
    "branch_l1 = [faker.Faker('zh_CN').province() for x in range(5)]\n",
    "df = pd.DataFrame(columns=['branch_l1','period','stat_month','amt'])\n",
    "for branch in branch_l1:\n",
    "    for stat_month in stat_month_list:\n",
    "        for period in ['本期','去年同期']:\n",
    "            amt = np.random.randint(8000, 10000)\n",
    "            df.loc[len(df)] = [branch, period, stat_month, amt]\n",
    "df\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def calcRate(df,col):\n",
    "    tmp_df = df.copy()\n",
    "    nextList = list(tmp_df[col])[1:]\n",
    "    prevList = list(tmp_df[col])[:-1]\n",
    "    rateList = []\n",
    "    for x,y in zip(nextList,prevList):\n",
    "        rate = (x - y) / y\n",
    "        rateList.append(rate)\n",
    "    rateList.insert(0,np.nan)\n",
    "    tmp_df['rate'] = rateList\n",
    "    return tmp_df,rateList\n",
    "\n",
    "def calc_coff(rateList1,rateList2):\n",
    "    dic = {'cur':rateList1,'tongqi':rateList2}\n",
    "    df = pd.DataFrame(dic)\n",
    "    return df.corr()['cur']['tongqi']\n",
    "\n",
    "def calcCV(df, col):\n",
    "    df['cv'] = df[col].std() / df[col].mean()\n",
    "    return df\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sys import last_traceback\n",
    "from turtle import tiltangle\n",
    "\n",
    "d_tongqi = df.loc[(df['period'] == '去年同期')]\n",
    "d_cur = df.loc[(df['period'] == '本期')]\n",
    "# t_cur = d_cur.groupby(by=['stat_month']).agg(total=('amt','sum')).reset_index()\n",
    "# t_cur.sort_values('stat_month')\n",
    "# # 计算总体的rateList∂\n",
    "# t_cur,total_rate_list = calcRate(t_cur,'total')\n",
    "# print(total_rate_list,t_cur)\n",
    "\n",
    "# 判断各机构与总体趋势是否一致，主要看增长率的相关系数，越相近说明一致。分析出正向、负向作用的机构。\n",
    "# 计算各机构的占比，\n",
    "def calcIndex(df):\n",
    "    corr_dict = {}\n",
    "    tt1 = pd.DataFrame()\n",
    "    for branch in branch_l1:\n",
    "        tmp_df = df.loc[(df['branch_l1'] == branch)]\n",
    "        tmp_sum_df = tmp_df.groupby(by=['branch_l1', 'period','stat_month']).agg(total=('amt','sum')).reset_index()\n",
    "        tmp_sum_df,tmp_rate_list = calcRate(tmp_sum_df, 'total')\n",
    "        coff = calc_coff(tmp_rate_list,total_rate_list)\n",
    "        corr_dict[branch] = coff\n",
    "        tt1 = pd.concat([tt1,tmp_sum_df],axis = 0)\n",
    "    ratio_dict = {}\n",
    "    tt = pd.DataFrame()\n",
    "    for stat_month in stat_month_list:\n",
    "        t_cur = df.groupby(by=['stat_month']).agg(total=('amt','sum')).reset_index()\n",
    "        cur_total = t_cur.loc[t_cur['stat_month'] == stat_month,'total'].values[0]\n",
    "        tmp_df = df.loc[df['stat_month'] == stat_month].copy()\n",
    "        tmp_sum_df = tmp_df.groupby(by=['branch_l1','period','stat_month']).agg(total=('amt','sum')).reset_index()\n",
    "\n",
    "        tmp_sum_df['ratio'] = tmp_sum_df['total'].map(lambda x: float(x)/float(cur_total))\n",
    "        ratio_dict[stat_month] = list(tmp_sum_df['ratio'])\n",
    "        tt = pd.concat([tt,tmp_sum_df],axis = 0)# display(corr_dict)\n",
    "    tt_e = pd.merge(left = tt1,right = tt ,how = 'left',on = ['branch_l1','period','stat_month'])\n",
    "    return tt_e\n",
    "    display(tt_e)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>branch_l1</th>\n",
       "      <th>period</th>\n",
       "      <th>stat_month</th>\n",
       "      <th>total_x</th>\n",
       "      <th>rate</th>\n",
       "      <th>total_y</th>\n",
       "      <th>ratio</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>8659</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8659</td>\n",
       "      <td>0.184631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>8239</td>\n",
       "      <td>-0.048504</td>\n",
       "      <td>8239</td>\n",
       "      <td>0.187131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>9327</td>\n",
       "      <td>0.132055</td>\n",
       "      <td>9327</td>\n",
       "      <td>0.208985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>9045</td>\n",
       "      <td>-0.030235</td>\n",
       "      <td>9045</td>\n",
       "      <td>0.202290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>9807</td>\n",
       "      <td>0.084245</td>\n",
       "      <td>9807</td>\n",
       "      <td>0.215586</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>9186</td>\n",
       "      <td>-0.063322</td>\n",
       "      <td>9186</td>\n",
       "      <td>0.206214</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>9117</td>\n",
       "      <td>-0.007511</td>\n",
       "      <td>9117</td>\n",
       "      <td>0.197509</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9184</td>\n",
       "      <td>0.007349</td>\n",
       "      <td>9184</td>\n",
       "      <td>0.194272</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>8280</td>\n",
       "      <td>-0.098432</td>\n",
       "      <td>8280</td>\n",
       "      <td>0.184319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>8247</td>\n",
       "      <td>-0.003986</td>\n",
       "      <td>8247</td>\n",
       "      <td>0.178221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8040</td>\n",
       "      <td>-0.025100</td>\n",
       "      <td>8040</td>\n",
       "      <td>0.180031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>8150</td>\n",
       "      <td>0.013682</td>\n",
       "      <td>8150</td>\n",
       "      <td>0.180934</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9579</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9579</td>\n",
       "      <td>0.204247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>9342</td>\n",
       "      <td>-0.024742</td>\n",
       "      <td>9342</td>\n",
       "      <td>0.212183</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>8437</td>\n",
       "      <td>-0.096874</td>\n",
       "      <td>8437</td>\n",
       "      <td>0.189043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>9786</td>\n",
       "      <td>0.159891</td>\n",
       "      <td>9786</td>\n",
       "      <td>0.218863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>8972</td>\n",
       "      <td>-0.083180</td>\n",
       "      <td>8972</td>\n",
       "      <td>0.197230</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>9458</td>\n",
       "      <td>0.054169</td>\n",
       "      <td>9458</td>\n",
       "      <td>0.212320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>8835</td>\n",
       "      <td>-0.065870</td>\n",
       "      <td>8835</td>\n",
       "      <td>0.191399</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9992</td>\n",
       "      <td>0.130956</td>\n",
       "      <td>9992</td>\n",
       "      <td>0.211364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>9988</td>\n",
       "      <td>-0.000400</td>\n",
       "      <td>9988</td>\n",
       "      <td>0.222341</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>8562</td>\n",
       "      <td>-0.142771</td>\n",
       "      <td>8562</td>\n",
       "      <td>0.185028</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8909</td>\n",
       "      <td>0.040528</td>\n",
       "      <td>8909</td>\n",
       "      <td>0.199489</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9180</td>\n",
       "      <td>0.030419</td>\n",
       "      <td>9180</td>\n",
       "      <td>0.203801</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9943</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9943</td>\n",
       "      <td>0.212009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>9075</td>\n",
       "      <td>-0.087298</td>\n",
       "      <td>9075</td>\n",
       "      <td>0.206119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>8676</td>\n",
       "      <td>-0.043967</td>\n",
       "      <td>8676</td>\n",
       "      <td>0.194398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>8305</td>\n",
       "      <td>-0.042762</td>\n",
       "      <td>8305</td>\n",
       "      <td>0.185740</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>8763</td>\n",
       "      <td>0.055148</td>\n",
       "      <td>8763</td>\n",
       "      <td>0.192636</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>9483</td>\n",
       "      <td>0.082164</td>\n",
       "      <td>9483</td>\n",
       "      <td>0.212881</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.000211</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.205481</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9196</td>\n",
       "      <td>-0.030469</td>\n",
       "      <td>9196</td>\n",
       "      <td>0.194526</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>8330</td>\n",
       "      <td>-0.094171</td>\n",
       "      <td>8330</td>\n",
       "      <td>0.185433</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>9997</td>\n",
       "      <td>0.200120</td>\n",
       "      <td>9997</td>\n",
       "      <td>0.216039</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>9473</td>\n",
       "      <td>-0.052416</td>\n",
       "      <td>9473</td>\n",
       "      <td>0.212118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9910</td>\n",
       "      <td>0.046131</td>\n",
       "      <td>9910</td>\n",
       "      <td>0.220007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9012</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9012</td>\n",
       "      <td>0.192158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>9219</td>\n",
       "      <td>0.022969</td>\n",
       "      <td>9219</td>\n",
       "      <td>0.209389</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.028853</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.212525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>8174</td>\n",
       "      <td>-0.138218</td>\n",
       "      <td>8174</td>\n",
       "      <td>0.182810</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>9557</td>\n",
       "      <td>0.169195</td>\n",
       "      <td>9557</td>\n",
       "      <td>0.210090</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>8087</td>\n",
       "      <td>-0.153814</td>\n",
       "      <td>8087</td>\n",
       "      <td>0.181543</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>8946</td>\n",
       "      <td>0.106220</td>\n",
       "      <td>8946</td>\n",
       "      <td>0.193804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9699</td>\n",
       "      <td>0.084172</td>\n",
       "      <td>9699</td>\n",
       "      <td>0.205166</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>8658</td>\n",
       "      <td>-0.107331</td>\n",
       "      <td>8658</td>\n",
       "      <td>0.192734</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>9920</td>\n",
       "      <td>0.145761</td>\n",
       "      <td>9920</td>\n",
       "      <td>0.214375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8772</td>\n",
       "      <td>-0.115726</td>\n",
       "      <td>8772</td>\n",
       "      <td>0.196422</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>8308</td>\n",
       "      <td>-0.052896</td>\n",
       "      <td>8308</td>\n",
       "      <td>0.184442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9706</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9706</td>\n",
       "      <td>0.206955</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>8153</td>\n",
       "      <td>-0.160004</td>\n",
       "      <td>8153</td>\n",
       "      <td>0.185178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>8705</td>\n",
       "      <td>0.067705</td>\n",
       "      <td>8705</td>\n",
       "      <td>0.195048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>9403</td>\n",
       "      <td>0.080184</td>\n",
       "      <td>9403</td>\n",
       "      <td>0.210297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>8391</td>\n",
       "      <td>-0.107625</td>\n",
       "      <td>8391</td>\n",
       "      <td>0.184458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>8332</td>\n",
       "      <td>-0.007031</td>\n",
       "      <td>8332</td>\n",
       "      <td>0.187043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>9777</td>\n",
       "      <td>0.173428</td>\n",
       "      <td>9777</td>\n",
       "      <td>0.211807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9203</td>\n",
       "      <td>-0.058709</td>\n",
       "      <td>9203</td>\n",
       "      <td>0.194674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>9666</td>\n",
       "      <td>0.050310</td>\n",
       "      <td>9666</td>\n",
       "      <td>0.215173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>9548</td>\n",
       "      <td>-0.012208</td>\n",
       "      <td>9548</td>\n",
       "      <td>0.206336</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>9465</td>\n",
       "      <td>-0.008693</td>\n",
       "      <td>9465</td>\n",
       "      <td>0.211939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9496</td>\n",
       "      <td>0.003275</td>\n",
       "      <td>9496</td>\n",
       "      <td>0.210816</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   branch_l1 period stat_month  total_x      rate  total_y     ratio\n",
       "0        天津市     本期        01月     8659       NaN     8659  0.184631\n",
       "1        天津市     本期        02月     8239 -0.048504     8239  0.187131\n",
       "2        天津市     本期        03月     9327  0.132055     9327  0.208985\n",
       "3        天津市     本期        04月     9045 -0.030235     9045  0.202290\n",
       "4        天津市     本期        05月     9807  0.084245     9807  0.215586\n",
       "5        天津市     本期        06月     9186 -0.063322     9186  0.206214\n",
       "6        天津市     本期        07月     9117 -0.007511     9117  0.197509\n",
       "7        天津市     本期        08月     9184  0.007349     9184  0.194272\n",
       "8        天津市     本期        09月     8280 -0.098432     8280  0.184319\n",
       "9        天津市     本期        10月     8247 -0.003986     8247  0.178221\n",
       "10       天津市     本期        11月     8040 -0.025100     8040  0.180031\n",
       "11       天津市     本期        12月     8150  0.013682     8150  0.180934\n",
       "12       吉林省     本期        01月     9579       NaN     9579  0.204247\n",
       "13       吉林省     本期        02月     9342 -0.024742     9342  0.212183\n",
       "14       吉林省     本期        03月     8437 -0.096874     8437  0.189043\n",
       "15       吉林省     本期        04月     9786  0.159891     9786  0.218863\n",
       "16       吉林省     本期        05月     8972 -0.083180     8972  0.197230\n",
       "17       吉林省     本期        06月     9458  0.054169     9458  0.212320\n",
       "18       吉林省     本期        07月     8835 -0.065870     8835  0.191399\n",
       "19       吉林省     本期        08月     9992  0.130956     9992  0.211364\n",
       "20       吉林省     本期        09月     9988 -0.000400     9988  0.222341\n",
       "21       吉林省     本期        10月     8562 -0.142771     8562  0.185028\n",
       "22       吉林省     本期        11月     8909  0.040528     8909  0.199489\n",
       "23       吉林省     本期        12月     9180  0.030419     9180  0.203801\n",
       "24       福建省     本期        01月     9943       NaN     9943  0.212009\n",
       "25       福建省     本期        02月     9075 -0.087298     9075  0.206119\n",
       "26       福建省     本期        03月     8676 -0.043967     8676  0.194398\n",
       "27       福建省     本期        04月     8305 -0.042762     8305  0.185740\n",
       "28       福建省     本期        05月     8763  0.055148     8763  0.192636\n",
       "29       福建省     本期        06月     9483  0.082164     9483  0.212881\n",
       "30       福建省     本期        07月     9485  0.000211     9485  0.205481\n",
       "31       福建省     本期        08月     9196 -0.030469     9196  0.194526\n",
       "32       福建省     本期        09月     8330 -0.094171     8330  0.185433\n",
       "33       福建省     本期        10月     9997  0.200120     9997  0.216039\n",
       "34       福建省     本期        11月     9473 -0.052416     9473  0.212118\n",
       "35       福建省     本期        12月     9910  0.046131     9910  0.220007\n",
       "36       上海市     本期        01月     9012       NaN     9012  0.192158\n",
       "37       上海市     本期        02月     9219  0.022969     9219  0.209389\n",
       "38       上海市     本期        03月     9485  0.028853     9485  0.212525\n",
       "39       上海市     本期        04月     8174 -0.138218     8174  0.182810\n",
       "40       上海市     本期        05月     9557  0.169195     9557  0.210090\n",
       "41       上海市     本期        06月     8087 -0.153814     8087  0.181543\n",
       "42       上海市     本期        07月     8946  0.106220     8946  0.193804\n",
       "43       上海市     本期        08月     9699  0.084172     9699  0.205166\n",
       "44       上海市     本期        09月     8658 -0.107331     8658  0.192734\n",
       "45       上海市     本期        10月     9920  0.145761     9920  0.214375\n",
       "46       上海市     本期        11月     8772 -0.115726     8772  0.196422\n",
       "47       上海市     本期        12月     8308 -0.052896     8308  0.184442\n",
       "48   澳门特别行政区     本期        01月     9706       NaN     9706  0.206955\n",
       "49   澳门特别行政区     本期        02月     8153 -0.160004     8153  0.185178\n",
       "50   澳门特别行政区     本期        03月     8705  0.067705     8705  0.195048\n",
       "51   澳门特别行政区     本期        04月     9403  0.080184     9403  0.210297\n",
       "52   澳门特别行政区     本期        05月     8391 -0.107625     8391  0.184458\n",
       "53   澳门特别行政区     本期        06月     8332 -0.007031     8332  0.187043\n",
       "54   澳门特别行政区     本期        07月     9777  0.173428     9777  0.211807\n",
       "55   澳门特别行政区     本期        08月     9203 -0.058709     9203  0.194674\n",
       "56   澳门特别行政区     本期        09月     9666  0.050310     9666  0.215173\n",
       "57   澳门特别行政区     本期        10月     9548 -0.012208     9548  0.206336\n",
       "58   澳门特别行政区     本期        11月     9465 -0.008693     9465  0.211939\n",
       "59   澳门特别行政区     本期        12月     9496  0.003275     9496  0.210816"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cc = calcIndex(d_cur)\n",
    "display(cc)\n",
    "    #display(cur_total,ratio_dict)\n",
    "    # tmp_sum_df = tmp_df.groupby(by=['branch_l1']).agg(total=('amt','sum')).reset_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>branch_l1</th>\n",
       "      <th>period</th>\n",
       "      <th>stat_month</th>\n",
       "      <th>total_x</th>\n",
       "      <th>rate</th>\n",
       "      <th>total_y</th>\n",
       "      <th>ratio</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>8659</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8659</td>\n",
       "      <td>0.184631</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>8239</td>\n",
       "      <td>-0.048504</td>\n",
       "      <td>8239</td>\n",
       "      <td>0.187131</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>9327</td>\n",
       "      <td>0.132055</td>\n",
       "      <td>9327</td>\n",
       "      <td>0.208985</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>9045</td>\n",
       "      <td>-0.030235</td>\n",
       "      <td>9045</td>\n",
       "      <td>0.202290</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>9807</td>\n",
       "      <td>0.084245</td>\n",
       "      <td>9807</td>\n",
       "      <td>0.215586</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>9186</td>\n",
       "      <td>-0.063322</td>\n",
       "      <td>9186</td>\n",
       "      <td>0.206214</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>9117</td>\n",
       "      <td>-0.007511</td>\n",
       "      <td>9117</td>\n",
       "      <td>0.197509</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9184</td>\n",
       "      <td>0.007349</td>\n",
       "      <td>9184</td>\n",
       "      <td>0.194272</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>8280</td>\n",
       "      <td>-0.098432</td>\n",
       "      <td>8280</td>\n",
       "      <td>0.184319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>8247</td>\n",
       "      <td>-0.003986</td>\n",
       "      <td>8247</td>\n",
       "      <td>0.178221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8040</td>\n",
       "      <td>-0.025100</td>\n",
       "      <td>8040</td>\n",
       "      <td>0.180031</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>天津市</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>8150</td>\n",
       "      <td>0.013682</td>\n",
       "      <td>8150</td>\n",
       "      <td>0.180934</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9579</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9579</td>\n",
       "      <td>0.204247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>9342</td>\n",
       "      <td>-0.024742</td>\n",
       "      <td>9342</td>\n",
       "      <td>0.212183</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>8437</td>\n",
       "      <td>-0.096874</td>\n",
       "      <td>8437</td>\n",
       "      <td>0.189043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>9786</td>\n",
       "      <td>0.159891</td>\n",
       "      <td>9786</td>\n",
       "      <td>0.218863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>8972</td>\n",
       "      <td>-0.083180</td>\n",
       "      <td>8972</td>\n",
       "      <td>0.197230</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>9458</td>\n",
       "      <td>0.054169</td>\n",
       "      <td>9458</td>\n",
       "      <td>0.212320</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>8835</td>\n",
       "      <td>-0.065870</td>\n",
       "      <td>8835</td>\n",
       "      <td>0.191399</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9992</td>\n",
       "      <td>0.130956</td>\n",
       "      <td>9992</td>\n",
       "      <td>0.211364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>9988</td>\n",
       "      <td>-0.000400</td>\n",
       "      <td>9988</td>\n",
       "      <td>0.222341</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>8562</td>\n",
       "      <td>-0.142771</td>\n",
       "      <td>8562</td>\n",
       "      <td>0.185028</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8909</td>\n",
       "      <td>0.040528</td>\n",
       "      <td>8909</td>\n",
       "      <td>0.199489</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>吉林省</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9180</td>\n",
       "      <td>0.030419</td>\n",
       "      <td>9180</td>\n",
       "      <td>0.203801</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9943</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9943</td>\n",
       "      <td>0.212009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>9075</td>\n",
       "      <td>-0.087298</td>\n",
       "      <td>9075</td>\n",
       "      <td>0.206119</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>8676</td>\n",
       "      <td>-0.043967</td>\n",
       "      <td>8676</td>\n",
       "      <td>0.194398</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>8305</td>\n",
       "      <td>-0.042762</td>\n",
       "      <td>8305</td>\n",
       "      <td>0.185740</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>8763</td>\n",
       "      <td>0.055148</td>\n",
       "      <td>8763</td>\n",
       "      <td>0.192636</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>9483</td>\n",
       "      <td>0.082164</td>\n",
       "      <td>9483</td>\n",
       "      <td>0.212881</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.000211</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.205481</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>31</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9196</td>\n",
       "      <td>-0.030469</td>\n",
       "      <td>9196</td>\n",
       "      <td>0.194526</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>32</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>8330</td>\n",
       "      <td>-0.094171</td>\n",
       "      <td>8330</td>\n",
       "      <td>0.185433</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>9997</td>\n",
       "      <td>0.200120</td>\n",
       "      <td>9997</td>\n",
       "      <td>0.216039</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>9473</td>\n",
       "      <td>-0.052416</td>\n",
       "      <td>9473</td>\n",
       "      <td>0.212118</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>福建省</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9910</td>\n",
       "      <td>0.046131</td>\n",
       "      <td>9910</td>\n",
       "      <td>0.220007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9012</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9012</td>\n",
       "      <td>0.192158</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>9219</td>\n",
       "      <td>0.022969</td>\n",
       "      <td>9219</td>\n",
       "      <td>0.209389</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.028853</td>\n",
       "      <td>9485</td>\n",
       "      <td>0.212525</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>8174</td>\n",
       "      <td>-0.138218</td>\n",
       "      <td>8174</td>\n",
       "      <td>0.182810</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>9557</td>\n",
       "      <td>0.169195</td>\n",
       "      <td>9557</td>\n",
       "      <td>0.210090</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>8087</td>\n",
       "      <td>-0.153814</td>\n",
       "      <td>8087</td>\n",
       "      <td>0.181543</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>8946</td>\n",
       "      <td>0.106220</td>\n",
       "      <td>8946</td>\n",
       "      <td>0.193804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9699</td>\n",
       "      <td>0.084172</td>\n",
       "      <td>9699</td>\n",
       "      <td>0.205166</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>8658</td>\n",
       "      <td>-0.107331</td>\n",
       "      <td>8658</td>\n",
       "      <td>0.192734</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>9920</td>\n",
       "      <td>0.145761</td>\n",
       "      <td>9920</td>\n",
       "      <td>0.214375</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>8772</td>\n",
       "      <td>-0.115726</td>\n",
       "      <td>8772</td>\n",
       "      <td>0.196422</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>上海市</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>8308</td>\n",
       "      <td>-0.052896</td>\n",
       "      <td>8308</td>\n",
       "      <td>0.184442</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>01月</td>\n",
       "      <td>9706</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9706</td>\n",
       "      <td>0.206955</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>02月</td>\n",
       "      <td>8153</td>\n",
       "      <td>-0.160004</td>\n",
       "      <td>8153</td>\n",
       "      <td>0.185178</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>03月</td>\n",
       "      <td>8705</td>\n",
       "      <td>0.067705</td>\n",
       "      <td>8705</td>\n",
       "      <td>0.195048</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>04月</td>\n",
       "      <td>9403</td>\n",
       "      <td>0.080184</td>\n",
       "      <td>9403</td>\n",
       "      <td>0.210297</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>05月</td>\n",
       "      <td>8391</td>\n",
       "      <td>-0.107625</td>\n",
       "      <td>8391</td>\n",
       "      <td>0.184458</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>06月</td>\n",
       "      <td>8332</td>\n",
       "      <td>-0.007031</td>\n",
       "      <td>8332</td>\n",
       "      <td>0.187043</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>07月</td>\n",
       "      <td>9777</td>\n",
       "      <td>0.173428</td>\n",
       "      <td>9777</td>\n",
       "      <td>0.211807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>08月</td>\n",
       "      <td>9203</td>\n",
       "      <td>-0.058709</td>\n",
       "      <td>9203</td>\n",
       "      <td>0.194674</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>09月</td>\n",
       "      <td>9666</td>\n",
       "      <td>0.050310</td>\n",
       "      <td>9666</td>\n",
       "      <td>0.215173</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>10月</td>\n",
       "      <td>9548</td>\n",
       "      <td>-0.012208</td>\n",
       "      <td>9548</td>\n",
       "      <td>0.206336</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>11月</td>\n",
       "      <td>9465</td>\n",
       "      <td>-0.008693</td>\n",
       "      <td>9465</td>\n",
       "      <td>0.211939</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>澳门特别行政区</td>\n",
       "      <td>本期</td>\n",
       "      <td>12月</td>\n",
       "      <td>9496</td>\n",
       "      <td>0.003275</td>\n",
       "      <td>9496</td>\n",
       "      <td>0.210816</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   branch_l1 period stat_month  total_x      rate  total_y     ratio\n",
       "0        天津市     本期        01月     8659       NaN     8659  0.184631\n",
       "1        天津市     本期        02月     8239 -0.048504     8239  0.187131\n",
       "2        天津市     本期        03月     9327  0.132055     9327  0.208985\n",
       "3        天津市     本期        04月     9045 -0.030235     9045  0.202290\n",
       "4        天津市     本期        05月     9807  0.084245     9807  0.215586\n",
       "5        天津市     本期        06月     9186 -0.063322     9186  0.206214\n",
       "6        天津市     本期        07月     9117 -0.007511     9117  0.197509\n",
       "7        天津市     本期        08月     9184  0.007349     9184  0.194272\n",
       "8        天津市     本期        09月     8280 -0.098432     8280  0.184319\n",
       "9        天津市     本期        10月     8247 -0.003986     8247  0.178221\n",
       "10       天津市     本期        11月     8040 -0.025100     8040  0.180031\n",
       "11       天津市     本期        12月     8150  0.013682     8150  0.180934\n",
       "12       吉林省     本期        01月     9579       NaN     9579  0.204247\n",
       "13       吉林省     本期        02月     9342 -0.024742     9342  0.212183\n",
       "14       吉林省     本期        03月     8437 -0.096874     8437  0.189043\n",
       "15       吉林省     本期        04月     9786  0.159891     9786  0.218863\n",
       "16       吉林省     本期        05月     8972 -0.083180     8972  0.197230\n",
       "17       吉林省     本期        06月     9458  0.054169     9458  0.212320\n",
       "18       吉林省     本期        07月     8835 -0.065870     8835  0.191399\n",
       "19       吉林省     本期        08月     9992  0.130956     9992  0.211364\n",
       "20       吉林省     本期        09月     9988 -0.000400     9988  0.222341\n",
       "21       吉林省     本期        10月     8562 -0.142771     8562  0.185028\n",
       "22       吉林省     本期        11月     8909  0.040528     8909  0.199489\n",
       "23       吉林省     本期        12月     9180  0.030419     9180  0.203801\n",
       "24       福建省     本期        01月     9943       NaN     9943  0.212009\n",
       "25       福建省     本期        02月     9075 -0.087298     9075  0.206119\n",
       "26       福建省     本期        03月     8676 -0.043967     8676  0.194398\n",
       "27       福建省     本期        04月     8305 -0.042762     8305  0.185740\n",
       "28       福建省     本期        05月     8763  0.055148     8763  0.192636\n",
       "29       福建省     本期        06月     9483  0.082164     9483  0.212881\n",
       "30       福建省     本期        07月     9485  0.000211     9485  0.205481\n",
       "31       福建省     本期        08月     9196 -0.030469     9196  0.194526\n",
       "32       福建省     本期        09月     8330 -0.094171     8330  0.185433\n",
       "33       福建省     本期        10月     9997  0.200120     9997  0.216039\n",
       "34       福建省     本期        11月     9473 -0.052416     9473  0.212118\n",
       "35       福建省     本期        12月     9910  0.046131     9910  0.220007\n",
       "36       上海市     本期        01月     9012       NaN     9012  0.192158\n",
       "37       上海市     本期        02月     9219  0.022969     9219  0.209389\n",
       "38       上海市     本期        03月     9485  0.028853     9485  0.212525\n",
       "39       上海市     本期        04月     8174 -0.138218     8174  0.182810\n",
       "40       上海市     本期        05月     9557  0.169195     9557  0.210090\n",
       "41       上海市     本期        06月     8087 -0.153814     8087  0.181543\n",
       "42       上海市     本期        07月     8946  0.106220     8946  0.193804\n",
       "43       上海市     本期        08月     9699  0.084172     9699  0.205166\n",
       "44       上海市     本期        09月     8658 -0.107331     8658  0.192734\n",
       "45       上海市     本期        10月     9920  0.145761     9920  0.214375\n",
       "46       上海市     本期        11月     8772 -0.115726     8772  0.196422\n",
       "47       上海市     本期        12月     8308 -0.052896     8308  0.184442\n",
       "48   澳门特别行政区     本期        01月     9706       NaN     9706  0.206955\n",
       "49   澳门特别行政区     本期        02月     8153 -0.160004     8153  0.185178\n",
       "50   澳门特别行政区     本期        03月     8705  0.067705     8705  0.195048\n",
       "51   澳门特别行政区     本期        04月     9403  0.080184     9403  0.210297\n",
       "52   澳门特别行政区     本期        05月     8391 -0.107625     8391  0.184458\n",
       "53   澳门特别行政区     本期        06月     8332 -0.007031     8332  0.187043\n",
       "54   澳门特别行政区     本期        07月     9777  0.173428     9777  0.211807\n",
       "55   澳门特别行政区     本期        08月     9203 -0.058709     9203  0.194674\n",
       "56   澳门特别行政区     本期        09月     9666  0.050310     9666  0.215173\n",
       "57   澳门特别行政区     本期        10月     9548 -0.012208     9548  0.206336\n",
       "58   澳门特别行政区     本期        11月     9465 -0.008693     9465  0.211939\n",
       "59   澳门特别行政区     本期        12月     9496  0.003275     9496  0.210816"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n"
     ]
    }
   ],
   "source": [
    "print(type(tt1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
